package java115.Thread;
//线程休眠、结束
//查看线程的状态1
public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                
            }
        },"李四");

    System.out.println(t.getName() + ": " + t.getState());

    t.start();

    while(t.isAlive()){
        System.out.println(t.getName() + ": " + t.getState());
           }

    System.out.println(t.getName() + ": " + t.getState());
        }
}
